﻿using System;
using System.AddIn.Contract;
using System.AddIn.Pipeline;

namespace RootfusAddinContracts
{
    [AddInContract]
    public interface ISICallbackContract : IContract
    {
        void UpdateSaveInformation(string xmltext);

        /// <summary>
        /// Call when all output pins (indeed, even the names of the pins) have changed.
        /// </summary>
        void OutputPinsChanged();

        /// <summary>
        /// Call to get the root objects for an input pin. This will return all
        /// the objects it is connected to. If this is a infinite pin, there could
        /// be 0 or more, otherwise there is 0 or 1 bin.
        /// </summary>
        /// <param name="pin"></param>
        /// <returns></returns>
        ROOTObjectSpec[] GetConnectedPinDataAsROOTObject(IPinDefinitionContract pin);

        /// <summary>
        /// Returns the names of the pin(s) that are connected. Used for UI only!
        /// </summary>
        /// <param name="pinDefinition"></param>
        /// <returns></returns>
        string[] GetNamesOfConnectedPins(IPinDefinitionContract pin);

    }
}
